<%@ page language="java" import="pandora.bo.DFAJ.*,pandora.dto.*,pandora.bo.login.*,java.util.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
<title> <%=session.getAttribute("session.user")%> Catalog</title>
<link rel="stylesheet" type="text/css" href="style/style.css" />
</head>
<body>
<div id="main"><jsp:include page="/head.jsp" />


<div id="wrapper">

<div id="main_body">


<h1>Complete Catalog</h1>
<%
	DBLogin dbl = new DBLogin();

	if(dbl.verifyStore((String)session.getAttribute("session.user"))){
		UpdateCatalog c = new UpdateCatalog();
		
		List<PriceDTO> lp = c.listPrices();
%>
<table>
	<tr>
	<td>Product Name</td>
	<td>Price</td>
	<td>Date</td>
	</tr>
<%	for(PriceDTO p:lp){ %>
			<tr>
			<td><%=p.getProduct().getProductName()%></td>
			<td><%=p.getPrice()%></td>
			<td><%=p.getLastDate().toString()%></td>
			</tr>
	<% }%>

</table>
	<%}
%>

<br><br><a href="FrontController?res=JSP/JSP_DFAJ/prices.jsp">Back</a><br><br>

</div>

</div>

<jsp:include page="/foot.jsp" /></div>
</body>

</html>
